#ifndef __FILE_UTILS_H__
#define __FILE_UTILS_H__

#include <string>
#include <vector>
#include <ctime>

bool startsWith(const std::string& str, const std::string& prefix);
void moveFilesWithPrefixAndExtension(const std::string& sourceDir, const std::string& destinationDir, const std::string& prefix, const std::string& extension);
void moveDirectoriesWithPrefix(const std::string& src_dir, const std::string& dest_dir, const std::string& prefix);
void deleteDirectoriesWithPrefix(const std::string& src_dir, const std::string& prefix);
void moveDirectoriesWithPrefixAndExclusion(const std::string& src_dir, const std::string& dest_dir, 
                                          const std::string& prefix, const std::vector<std::string>& exclusions);
std::time_t getFileModifiedTime(const std::string& file_path);
std::string getFileSizeString(const std::string& file_path);
int countFilesWithExtension(const std::string& folder, const std::string& extension);
bool containsAny(const std::string& dirname, const std::vector<std::string>& substrings);
bool deleteFile(const std::string& file_path);
bool renameFile(const std::string& old_file_path, const std::string& new_file_path);
bool deleteFolder(const std::string& folder_path);
std::string extractFolderPath(const std::string& file_path, size_t n);
bool isPathContains(const std::string& file_path, const std::string& target_str);
std::string getFileExtension(const std::string& filePath);
std::string getFileName(const std::string& filePath);
std::string getFirstFileWithExtension(const std::string& folder, const std::string& extension);
std::string extractNthFolderName(const std::string& file_path, size_t n);
int fileSync();
int64_t getFileSizeInt(const std::string& file_path);
int64_t getTotalSizeOfFilesWithExtension(const std::string& folder, const std::string& extension);
std::time_t getFileModifiedTimeUsingStat64(const std::string& file_path);
int64_t getFileSizeIntUsingStat64(const std::string& file_path);
#endif